#include<iostream>


class Base
{
public:
    Base(int a):a(a){}



protected:
    int a;
};
class Base1:virtual public Base
{
public:
        Base1(int a,int b):Base(a),b(b){}



protected:
    int b;
};
class Base2:virtual public Base
{
public:
        Base2(int a,int c):Base(a),c(c){}



protected:
    int c;
};

//虚继承:解决菱形继承多重副本（原理使用虚继承指针）
//单继承加组合->多继承
class Derived:public Base1
{
public:
    Derived(int a,int b,int c)
    {
        this->a=a;
    }

private:
    Base2 b;

};